<!DOCTYPE html>
<head><title>Todolist</title></head>
<body>
<h1>我的待办事项</h1>
<form action="/todo/save" method="post">
    待办事项：<input type="text" name="content">
    <input type="submit" value="添加事项">
</form>

<table>
    <thead>
    <tr>
        <th>ID</th>
        <th>COMPLETE</th>
        <th>CONTENT</th>
        <th>ACTIONS</th>
    </tr>
    </thead>
    <tbody>
    <#list todoItems as item>
        <tr>
            <td>${item.id}</td>
            <td>
                <input type="checkbox" <#if item.complete>checked</#if>>
            </td>
            <td>
                <#if item.complete><s>${item.content}</s><#else>${item.content}</#if>
            </td>
            <td>
                <a href="/todo/check/${item.id}">完成</a> |
                <a href="/todo/edit/${item.id}">修改</a> |
                <a href="/todo/delete/${item.id}">删除</a>
            </td>
        </tr>
    </#list>
    </tbody>
</table>

</body>
</html>
